package androidx.appcompat.widget;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.MultiAutoCompleteTextView;
import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.d;
import o.ah.c;
import o.ar;
import o.ca;
import o.cc;
import o.cf;
import o.ct;
import o.cw;
import o.hy;

public class AppCompatMultiAutoCompleteTextView extends MultiAutoCompleteTextView implements hy {
    private static final int[] ˎ = new int[]{16843126};
    private final cc ˊ;
    private final ca ˋ;

    public AppCompatMultiAutoCompleteTextView(Context context) {
        this(context, null);
    }

    public AppCompatMultiAutoCompleteTextView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, c.ॱᐝ);
    }

    public AppCompatMultiAutoCompleteTextView(Context context, AttributeSet attributeSet, int i) {
        super(ct.ˋ(context), attributeSet, i);
        cw ॱ = cw.ॱ(getContext(), attributeSet, ˎ, i, 0);
        if (ॱ.ᐝ(0)) {
            setDropDownBackgroundDrawable(ॱ.ˋ(0));
        }
        ॱ.ॱ();
        this.ˋ = new ca(this);
        this.ˋ.ˋ(attributeSet, i);
        this.ˊ = new cc(this);
        this.ˊ.ˏ(attributeSet, i);
        this.ˊ.ˊ();
    }

    public void setDropDownBackgroundResource(@DrawableRes int i) {
        setDropDownBackgroundDrawable(ar.ˋ(getContext(), i));
    }

    public void setBackgroundResource(@DrawableRes int i) {
        super.setBackgroundResource(i);
        if (this.ˋ != null) {
            this.ˋ.ˎ(i);
        }
    }

    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        if (this.ˋ != null) {
            this.ˋ.ˋ(drawable);
        }
    }

    @RestrictTo({d.LIBRARY_GROUP})
    public void setSupportBackgroundTintList(@Nullable ColorStateList colorStateList) {
        if (this.ˋ != null) {
            this.ˋ.ˊ(colorStateList);
        }
    }

    @Nullable
    @RestrictTo({d.LIBRARY_GROUP})
    public ColorStateList ˊ() {
        return this.ˋ != null ? this.ˋ.ˎ() : null;
    }

    @RestrictTo({d.LIBRARY_GROUP})
    public void setSupportBackgroundTintMode(@Nullable Mode mode) {
        if (this.ˋ != null) {
            this.ˋ.ॱ(mode);
        }
    }

    @Nullable
    @RestrictTo({d.LIBRARY_GROUP})
    public Mode ॱ() {
        return this.ˋ != null ? this.ˋ.ॱ() : null;
    }

    protected void drawableStateChanged() {
        super.drawableStateChanged();
        if (this.ˋ != null) {
            this.ˋ.ˋ();
        }
        if (this.ˊ != null) {
            this.ˊ.ˊ();
        }
    }

    public void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        if (this.ˊ != null) {
            this.ˊ.ˋ(context, i);
        }
    }

    public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        return cf.ˊ(super.onCreateInputConnection(editorInfo), editorInfo, this);
    }
}
